Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 10 - Derived Media Handler Components / Derived Media Handler Components Reference
Functions / General Data Management


MediaSetActive

The MediaSetActive function allows the Movie Toolbox to enable and disable your media.

pascal ComponentResult MediaSetActive (ComponentInstance ci,
                                        Boolean enableMedia);
ci
Identifies the Movie Toolbox's connection to your derived media handler.
enableMedia

Contains a Boolean value that indicates whether your media is enabled or disabled. If this parameter is set to true, your media is enabled; if the parameter is false, your media is disabled.
DESCRIPTION
The Movie Toolbox calls your derived media handler's MediaSetActive function whenever your media is either enabled or disabled. Initially, your media is disabled. Subsequently, the enabled state of your media is controlled by the state of the track
that is using your media. When that track is enabled, your media is enabled; when that track is disabled, your media is disabled. Applications can control the enabled state of
a track by using the Movie Toolbox's SetTrackEnabled function.

Your derived media handler should support this function if you perform your own scheduling or if your media handler uses significant amounts of temporary storage. If you are doing your own scheduling (that is, you have set the handlerNoScheduler flag to 1 in the flags parameter of the MediaSetHandlerCapabilities function--see page 10-36 for more information about this function), your media handler needs to keep account of the media's active state so that you can properly respond to Movie Toolbox requests. When your media is disabled, you may choose to dispose of temporary storage you have allocated, so that the storage is available to other programs.

RESULT CODES
Any Component Manager result code


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help